package com.lin.game.controller;

import com.lin.game.entity.BeanHistory;
import com.lin.game.service.IBeanHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class BeanController {

    @Autowired
    private IBeanHistoryService BeanHistoryService;

    /**
     * 根据用户id，查询欢乐豆流水记录列表
     * @param uid
     * @return
     */
    @RequestMapping("/bean/list")
    public List<BeanHistory> queryListByUid(Integer uid){
        return BeanHistoryService.queryHistoryByUid(uid);
    }
}
